<template>
  <div class="calendar">
    <el-date-picker
      v-model="time"
      :type="dateType"
      value-format="timestamp"
      @change="getCalandarData"
      :picker-options="pickerOptions"
      :placeholder="$t('sell.select_date')">
    </el-date-picker>
  </div>
</template>
<script>
export default {
  name: 'calendar',
  props: ['dateType', 'pickerOptions'],
  data () {
    return {
      time: '',
      picker_Options: null
    }
  },
  mounted () {
    if (this.pickerOptions) {
      this.picker_Options = this.pickerOptions
    }
  },
  methods: {
    getCalandarData: function (val) {
      console.log(val, this.time)
      this.$emit('getTimer', val)
    }
  }
}
</script>
<style lang="less" scoped>
.calendar {
  .el-date-editor {
    width: 100%;
    /deep/input {
      background: none;
      color: #fff;
      border: none;
    }
  }
}
</style>
